home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nejlepší hry
/
Nejlepsi hry.iso
/
hry
/
sea of chaos
/
sea_install.msi
/
_15C39AAA7726369D39812BD40F01CF6A
/
_BFFF6357D7E443CE88BA5D007F5C3AD3
< prev
next >
Wrap
Text File
|
2005-03-23
|
631b
|
29 lines
//simple shader to clip any pixels with a Z coordinate below the water plane
//does not apply lights
//applies vertex diffuse colors and texture sampling
//clips anything below a specified z
//must be used with clipZ2.vsh
//Luke Lenhart
//(C)2004-2005 Digipen Institute of Technology
//clip anything below this
float minZ;
//base texture
sampler2D sampTex;
//shader input
struct PS_INPUT
{
float PosZ : TEXCOORD1;
float2 Tex0 : TEXCOORD0;
float4 Clr : COLOR0;
};
//shader
float4 PShader(PS_INPUT In) : COLOR
{
In.Clr.a*=saturate(In.PosZ-minZ);
return In.Clr*tex2D(sampTex,In.Tex0);
};